home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Design
/
WB Collection.iso
/
workbench werkzeuge
/
guis für programme
/
xanim guis
/
xanim
/
xanimamigabeta7
/
xanim_merlin.c
< prev
next >
Wrap
C/C++ Source or Header
|
1996-04-07
|
2KB
|
56 lines
#include <hrg/hrg_all.h>
struct Library *HRGSystemBase;
struct Library *HRGRenderBase;
struct Library *HRGToolBase;
struct HRHandle *hrh;
ULONG error;
UWORD modes[]= { HRCOL_PACKED8, HRCOL_XGA, HRCOL_RGB24, NULL };
ULONG *hrgtags[] = {
(ULONG *)HTRM_BitMapTypes, (ULONG *)&modes[0],
(ULONG *)TAG_END,0
};
struct TagItem screentags[] = {
{ HTOS_BitMapType, HRCOL_PACKED8 },
{ HTOS_Width, 192 },
{ HTOS_Height, 144 },
{ HTOS_Error, &error },
{ HTOS_Title, "Xanim Amiga" },
{ HTOS_EazyScreen, HRES_SCROLL },
/* { HTOS_DoDither, TRUE },*/
{ TAG_DONE, 0}
};
void CloseMerlin()
/* Exit program with message, return code 10 */
{
if(hrh) hrCloseScreen(hrh);
if(HRGSystemBase) CloseLibrary(HRGSystemBase);
if(HRGRenderBase) CloseLibrary(HRGRenderBase);
if(HRGToolBase) CloseLibrary(HRGToolBase);
}
/****************************************************************************/
void OpenMerlin()
{
if(!(HRGSystemBase=OpenLibrary((UBYTE *)"hrgsystem.library", 38L))) {CloseMerlin();exit(20);}
if(!(HRGRenderBase=OpenLibrary((UBYTE *)"hrgrender.library", 38L))) {CloseMerlin();exit(20);}
if(!(HRGToolBase=OpenLibrary((UBYTE *)"hrgtool.library", 38L))) {CloseMerlin();exit(20);}
if(!hrh) hrh=hrEazyOpenScreen( hrRequestModeTagList(( struct TagItem * )&hrgtags[0]) , 320, 200, HRES_SCROLL, (UBYTE *)"Xanim Amiga", &error);
if(!hrh) {CloseMerlin();exit(20);}
/* memstart=hrLockBitMap(&hrh->BitMap);
hrUnlockBitMap(&hrh->BitMap);
*/
/* hrSwitchDisplay(hrh,HRDISP_ON|HRDISP_BACK);*/
}